package cn.owng.server.plaza.socket.handler;

import cn.owng.protobuf.plaza.Message;
import cn.owng.server.plaza.socket.RequestHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.WebSocketSession;

import java.io.IOException;

/**
 * 微信公众号请关注: 开源螺丝钉
 * <br>
 * 码云请关注: <a href="https://gitee.com/xiyoufang">https://gitee.com/xiyoufang</a>
 * <br>
 * 哔哩哔哩请关注: <a href="https://space.bilibili.com/438927834">https://space.bilibili.com/438927834</a>
 *
 * @author xiyoufang
 */
@Slf4j
@Component
public class CoinHandler implements RequestHandler {

    @Override
    public void handle(WebSocketSession session, Message.Request request) throws IOException {

    }

    @Override
    public boolean isSupport(WebSocketSession session, Message.Request request) {
        return request.getMessageBodyCase() == Message.Request.MessageBodyCase.COIN;
    }
}
